import re

# text = '37131219841027717X'
# regularExpression = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|" \
#                         "(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)"
# person_id = re.findall(regularExpression, text)
# print(person_id)
# person_id1 = re.findall(r"([1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx])", text)
# print(person_id1)

text = '统一社会信用代码 92371302MA3D37A03D'

code_pattern = re.compile(r'[0-9a-zA-Z]{8,18}')

a = code_pattern.search(text)
print('overr!')
